﻿<Views:ViewPage x:Class="PhoneGuitarTab.UI.Views.AboutView"
               xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
               xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
               xmlns:Command="clr-namespace:PhoneCore.Framework.Views.Commands;assembly=PhoneGuitarTab.Core"
               xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
               xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
               xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
               xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
               xmlns:Views="clr-namespace:PhoneGuitarTab.Core.Views;assembly=PhoneGuitarTab.Core" 
               xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
                DataContext="{Binding About,
                                     Source={StaticResource Locator}}"
               FontFamily="{StaticResource PhoneFontFamilyNormal}"
               FontSize="{StaticResource PhoneFontSizeNormal}"
               Foreground="{StaticResource PhoneForegroundBrush}"
               Orientation="Portrait"
               SupportedOrientations="Portrait"
               d:DesignHeight="768"
               d:DesignWidth="480"
               shell:SystemTray.IsVisible="False"
                  Style="{StaticResource TransitionPageStyle}"
               mc:Ignorable="d">

    <Grid x:Name="LayoutRoot">
        <Grid.Background>
            <SolidColorBrush Color="Black">
            </SolidColorBrush>
        </Grid.Background>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" MinHeight="144" />
            <RowDefinition Height="253*" />
            <RowDefinition Height="263*"/>
            <RowDefinition Height="80*"/>
            <RowDefinition Height="60*"/>
        </Grid.RowDefinitions>

        <StackPanel x:Name="TitlePanel"
                    Grid.Row="0"
                    Margin="-2,16,2,0">
            <Grid Height="128">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="116" />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                <Image x:Name="PhoneGuitarTab" Source="/ApplicationIcon.png" Margin="0,10,1,29">
                </Image>
                <TextBlock VerticalAlignment="Bottom"
                	FontFamily="{StaticResource PhoneFontFamilyNormal}"
                	FontSize="{StaticResource PhoneFontSizeLarge}"
                	Foreground="White"
                	Text="{Binding Path=LocalizedResources.AppTitle_Lower, Source={StaticResource LocalizedStrings}}" 
                           Margin="0,0,55,65" Height="43" Grid.Column="1" />
                <TextBlock VerticalAlignment="Center"
                	FontFamily="{StaticResource PhoneFontFamilyLight}"
                	Text="{Binding Path=LocalizedResources.About_Version, Source={StaticResource LocalizedStrings}}"
                           Margin="3,66,272,41"  Grid.Column="1" FontSize="16" Height="21" />
                <TextBlock Margin="65,61,136,28"
                		VerticalAlignment="Center"
                		FontFamily="{StaticResource PhoneFontFamilySemiLight}"
                		Text="{Binding ApplicationVersion}"
                		FontSize="20" Grid.Column="1" Height="39" />
            </Grid>
        </StackPanel>

        <StackPanel Margin="0,0,2,0" Grid.Row="1">
            <TextBlock Margin="23,15,0,6"
        		TextWrapping="Wrap" Foreground="White" Height="252" >
        		<Run FontFamily="Segoe WP Semibold" Text="{Binding Path=LocalizedResources.About_AppTitle, Source={StaticResource LocalizedStrings}}"/>
        		<Run Text="{Binding Path=LocalizedResources.About_AppDescription, Source={StaticResource LocalizedStrings}}"/>
        		<LineBreak/>
        		<Run/>
                <LineBreak/>
        		<Run Text="{Binding PurchaseOrThanksMessage}"/>
            </TextBlock>
        </StackPanel>

        <StackPanel Margin="0,0,2,0" Grid.Row="2" toolkit:TiltEffect.IsTiltEnabled="True" Grid.RowSpan="2">
            <Grid Height="220">
                <Grid.RowDefinitions>
                    <RowDefinition Height="13*"/>
                    <RowDefinition Height="9*"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="18" />
                    <ColumnDefinition Width="147*" />
                    <ColumnDefinition Width="161" />
                    <ColumnDefinition Width="152*" />
                </Grid.ColumnDefinitions>
                <Button  BorderThickness="0" Grid.Column="1" Margin="0,0,5,0">
                    <Image x:Name="rate" Source="/Images/about/rate.png" Grid.Column="1" Height="80" Width="52">
                    </Image>
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="Tap">
                            <Command:ExecuteCommandAction Command="{Binding ReviewCommand, Mode=OneWay}" />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                </Button>
                <Button BorderThickness="0" Grid.Column="1" Content="{Binding Path=LocalizedResources.About_RateAndReview, Source={StaticResource LocalizedStrings}}" Margin="0,111,0,29"  FontWeight="ExtraLight" VerticalContentAlignment="Stretch" FontSize="16" Grid.RowSpan="2" Foreground="White" RenderTransformOrigin="0.51,0.513">
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="Tap">
                            <Command:ExecuteCommandAction Command="{Binding ReviewCommand, Mode=OneWay}" />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                </Button>

                <Button BorderThickness="0" Grid.Column="3" Margin="0,0,0,1" HorizontalAlignment="Left" Width="152" >
                    <Image x:Name="fb" Source="/Images/about/fb.png" Width="69"/>
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="Tap">
                            <Command:ExecuteCommandAction Command="{Binding ViewWebsiteCommand, Mode=OneWay}"
        					CommandParameter="{Binding FacebookUrl}"/>
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                </Button>
                <Button BorderThickness="0" Grid.Column="3" Content="{Binding Path=LocalizedResources.About_FacebookPage, Source={StaticResource LocalizedStrings}}" Margin="0,111,0,29"
                         VerticalContentAlignment="Stretch"
                        Height="80" FontWeight="ExtraLight" 
                        FontSize="16" Grid.RowSpan="2" Foreground="White">
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="Tap">
                            <Command:ExecuteCommandAction Command="{Binding ViewWebsiteCommand, Mode=OneWay}"
        					CommandParameter="{Binding FacebookUrl}"/>
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                </Button>

                <Button BorderThickness="0" Grid.Column="2" Margin="0,6,0,1"  >
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="Tap">
                            <Command:ExecuteCommandAction Command="{Binding SupportQuestionCommand, Mode=OneWay}" />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                    <Image x:Name="feedback" Source="/Images/about/feedback.png" Height="63" Width="64"/>
                </Button>

                <Button BorderThickness="0" Content="{Binding Path=LocalizedResources.About_GiveFeedback, Source={StaticResource LocalizedStrings}}" VerticalContentAlignment="Stretch"  Grid.Column="2"  Margin="0,111,0,29"  FontWeight="ExtraLight" FontSize="16" Grid.RowSpan="2" Foreground="White">
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="Tap">
                            <Command:ExecuteCommandAction Command="{Binding SupportQuestionCommand, Mode=OneWay}" />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                </Button>
            </Grid>
        </StackPanel>

        <StackPanel Grid.Row="3">
            <Button BorderThickness="2" Content="{Binding Path=LocalizedResources.Startup_RemoveAds, Source={StaticResource LocalizedStrings}}" VerticalContentAlignment="Stretch"   FontWeight="ExtraLight" FontSize="20"  Foreground="White" HorizontalAlignment="Center" Visibility="{Binding IsAdEnabled, Converter={StaticResource boolVisibility}}">
                <i:Interaction.Triggers>
                    <i:EventTrigger EventName="Tap">
                        <Command:ExecuteCommandAction Command="{Binding Startup.PurchasePro, Source={StaticResource Locator}}" />
                    </i:EventTrigger>
                </i:Interaction.Triggers>
            </Button>
        </StackPanel>

        <StackPanel Margin="2,5,0,0" Grid.Row="4" toolkit:TiltEffect.IsTiltEnabled="True">
            <TextBlock Foreground="White"
        		Text="{Binding Copyright}" TextAlignment="Center"
        		TextWrapping="Wrap" FontFamily="{StaticResource PhoneFontFamilyLight}" FontSize="14" Height="40" RenderTransformOrigin="0.533,-2.997" />
        </StackPanel>


    </Grid>

</Views:ViewPage>
